<?php
/**
*	checkbox
*/
namespace Rainrock\Framework\kernel\Html;



class HtmlCheckbox extends HtmlInput{
	
	public static function gets()
	{
		$obj = new HtmlCheckbox();
		return $obj;
	}

	
	protected $type = 'checkbox',$css='';
	
	protected function showBefore()
	{
		if($this->value=='1')$this->addAttrs('checked','true');
		$this->value = '';
		$this->addAttrs("value", '1');
	}
	
	
	public function show()
	{
		$nstr = parent::show();
		$vser = HtmlLabel::get('label');
		$vser->addCont($nstr);
		$vser->addCont($this->placeholder);
		return $vser->show();
	}
	
}